package com.sbtr;

import org.apache.commons.lang.StringUtils;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
//import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication(scanBasePackages = { "com.sbtr"}, exclude = {SecurityAutoConfiguration.class})
@EnableAspectJAutoProxy(proxyTargetClass = true)
@MapperScan({ "com.sbtr.business.**.mapper*","com.sbtr.security.**.mapper*"})
//@EnableEurekaClient
@EnableAsync
public class AiplatformProviderMain {
	
	protected static final Logger logger = LoggerFactory.getLogger(AiplatformProviderMain.class);
//	@Value("${upload.request.threadpool.max-size}")
//	private Integer ossHttpExecutorThreadPoolSize = 5;
	
	public static void main(String[] args) {
		SpringApplication.run(AiplatformProviderMain.class, args);
		String value = System.getenv("NODE_IP");
		System.out.println("NODE_IP:"+value);
		logger.info(StringUtils.rightPad("*", 80, "*"));
        logger.info(StringUtils.center(" aiplatform-provider start success! ", 80, "*"));
        logger.info(StringUtils.rightPad("*", 80, "*"));
	}
	
//	@Bean
//	public ThreadPoolExecutor ossHttpExecutor() {
//		return new ThreadPoolExecutor(ossHttpExecutorThreadPoolSize, ossHttpExecutorThreadPoolSize, 1,
//				TimeUnit.MINUTES, new ArrayBlockingQueue<>(1000),
//				new ThreadFactoryBuilder().setNameFormat("oss-task-assigner-%d").build());
//	}
}